package com.jt.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author jt
 * @date 2024/8/3 12:38
 */
@AllArgsConstructor
public enum modelEnums {

    one("0","立杆"),
    two("1","基座"),
    three("2","横杆"),
    four("3","斜拉杆"),
    five("4","上托"),
    six("5","下托"),
    seven("6","打包架");

    @Getter
    private final String code;

    @Getter
    private final String value;

    public static modelEnums of(String code) {
        if (code != null) {
            for (modelEnums s : modelEnums.values()) {
                if (s.getCode().equals(code)) {
                    return s;
                }
            }
        }
        return null;

    }
}
